//
//  StorageUtil.h
//  EliveClient
//
//  Created by Pierce on 2017/8/10.
//  Copyright © 2017年 Pierce. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface StorageUtil : NSObject

+ (NSUserDefaults *)getUserDefaults;
//存对象
+ (void)updateUserDefaultsWithKey:(NSString *)key Object:(id)object;
//取对象
+ (id)readObjectFromUserDefaultsWithKey:(NSString *)key;
//删除userDefault
+ (void)removeObjectFromUserDefaultsWithKey:(NSString *)key;


//建plist，存对象
+ (BOOL)writeToPlistWithKey:(NSString *)key Object:(id)object FileName:(NSString *)fileName;
//取对象
+ (id)readFromPlistWithKey:(NSString *)key FileName:(NSString *)fileName;
//删对象
+ (BOOL)removeObjectFromPlistWithKey:(NSString *)key FileName:(NSString *)fileName;


//存字典
+ (BOOL)updateDictionaryToPlist:(NSDictionary *)dic FileName:(NSString *)fileName;
//取字典
+ (NSMutableDictionary *)readDictionaryFromPlistWithFileName:(NSString *)fileName;


//存数组
+ (BOOL)updateArrayToPlist:(NSArray *)array FileName:(NSString *)fileName;
//取数组
+ (NSMutableArray *)readArrayFromPlistWithFileName:(NSString *)fileName;

//删plist
+ (BOOL)deletePlistFileWithFileName:(NSString *)fileName;


//判断路径是否存在
+ (BOOL)fileIsExisted:(NSString *)filePath;


@end
